package com.app.shortvideo.database

import androidx.room.*

@Dao
interface LocationEntryDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertLocation(vararg locationEntry : LocationEntry)

    @Query("SELECT * FROM locationEntry")
    suspend fun loadAllLocation(): List<LocationEntry>?
    @Query("SELECT * FROM locationEntry WHERE selected == 1 LIMIT 1")
//    @Query("SELECT * FROM locationEntry LIMIT 1")
    suspend fun queryCurrentLocation(): LocationEntry?
    @Delete
    suspend fun deleteLocation(vararg thumbImage: LocationEntry)
    @Update
    suspend fun updateLocation(vararg thumbImage: LocationEntry)
}